package com.ear.orange.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ear.orange.entity.ShoppingCart;

import java.util.List;

/**
 * @author orange
 */
public interface ShoppingCartService extends IService<ShoppingCart> {

    /**
     * 添加商品到购物车
     *
     * @param shoppingCart 商品信息
     * @return
     */
    ShoppingCart addProduct(ShoppingCart shoppingCart);

    /**
     * 展示商品到购物车
     *
     * @return
     */
    List<ShoppingCart> listProducts();

    /**
     * 一键清空购物车
     */
    void cleanProducts();

    /**
     * 购物车减少商品
     *
     * @param shoppingCart
     * @return
     */
    ShoppingCart decreaseProduct(ShoppingCart shoppingCart);
}
